package com.zh.ssmshirofreemarker.service;

import com.zh.ssmshirofreemarker.entity.User;
import com.zh.ssmshirofreemarker.entity.UserRole;
import com.baomidou.mybatisplus.service.IService;
import com.zh.ssmshirofreemarker.mapper.UserRoleMapper;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Set;
import com.zh.ssmshirofreemarker.entity.UserRole;
import com.baomidou.mybatisplus.service.IService;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author ZH
 * @since 2018-07-24
 */
public interface IUserRoleService extends IService<UserRole> {

    public Set<String> getRolesByUsername(User user);

    public boolean bindRoles(Long userId,List<Long> roleIds);

    public List<String> getUserNamesByRoleId(Long id);   //查询拥有该角色的所有用户名

}
